<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/script/js/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        function a() {
            $(function () {
                $.ajax({
                    type:"post",
                    url: "${pageContext.request.contextPath}/a1",
                    data:{"username":$("#username").val()},
                    success:function (data) {
                    alert(data);
                }
                })
            })
        }
    </script>
  </head>
  <body>
  输入<input type="text" id="username" onblur="a()">
  </body>
</html>
